//
//  OrientationExampleViewController.m
//  OrientationExample
//

#import "OrientationExampleViewController.h"

@implementation OrientationExampleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	float boxSize = 100.0;
	redTextBox = [[UITextView alloc]
				  initWithFrame:CGRectMake(110,180,boxSize,boxSize)];
	redTextBox.backgroundColor = [UIColor redColor];
	redTextBox.textColor = [UIColor whiteColor];
	redTextBox.text = @"Hello World";
	redTextBox.textAlignment = UITextAlignmentCenter;
	
	redTextBox.autoresizingMask = (UIViewAutoresizingFlexibleRightMargin
								   | UIViewAutoresizingFlexibleLeftMargin
								   | UIViewAutoresizingFlexibleTopMargin
								   | UIViewAutoresizingFlexibleBottomMargin);
	
	[self.view addSubview:redTextBox];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
	return YES;
}

- (void)dealloc {
	[redTextBox release];
    [super dealloc];
}

@end
